<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::radios('row[type]', ['install'=>'安装', 'repair'=>'维修'], 'install', ['data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择城市')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
                <select class="province form-control" name="province" data-url="ajax/area"></select>
                <select class="city form-control" name="city" data-url="ajax/area"></select>
                <select class="area form-control" name="area" data-url="ajax/area"></select>
            </div>
        </div>
    </div>

    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('经度')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lng" class="form-control" name="row[address_lng]" type="text">
        </div>
    </div>

    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('纬度')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lat" class="form-control" name="row[address_lat]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('详细地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" class="form-control" data-toggle="addresspicker" data-input-id="c-address" data-lng-id="c-lng" data-lat-id="c-lat" name="row[address]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('联系人')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" class="form-control" name="row[mobile]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reservation_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reservation_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[reservation_time]" type="text" value="{:date('Y-m-d H:i:s', time() + 3600 * 1)}">
        </div>
    </div>

    <!--安装充电桩参数-->
    <div class="form-group" id="install">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择安装服务')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="first,second,third">
                <select class="first form-control" name="row[power_id]" data-url="power_type/powerlist">
                </select>
                <select class="second form-control" name="row[package_id]" data-url="package/packagelist" data-query-name="pid">
                </select>
                <select id="c-package_type" class="third form-control" name="row[package_type_id]" data-url="package_type/packagetypelist" data-query-name="pid">
                </select>
            </div>
        </div>
    </div>

    <!--维修充电桩参数-->
    <div class="hide"  id="repair">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('设备名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-device_name" class="form-control" name="row[device_name]" type="text" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('设备型号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-device_model" class="form-control" name="row[device_model]" type="text" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('维修类型')}:</label>
        <div class="col-xs-12 col-sm-8">
             {:Form::selectpage('row[repair_type]', 2, 'report_type/index', null, null, ['data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('问题')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[title]" type="text" >
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('描述')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-description" class="form-control" rows="5" name="row[description]"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label for="c-annex" class="control-label col-xs-12 col-sm-2">{:__('附件')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-annex" data-rule="" class="form-control" size="50" name="row[annex]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-annex" class="btn btn-danger faupload" data-input-id="c-annex" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,mp4" data-multiple="false" data-preview-id="p-annex"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-annex" class="btn btn-primary fachoose" data-input-id="c-annex" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-annex"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-annex"></ul>
        </div>
    </div>
    </div>




    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-amount" min="0" class="form-control" step="0.01" name="row[amount]" type="number" value="0.00">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Memo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-memo" class="form-control" name="row[memo]" type="text">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
